<!DOCTYPE html>
<html>
<!-- head -->
{include file="common/page/head"}
<link rel="stylesheet" href="__app__/admin/view/Member/uploadVcr/uploadVcr.css?z={:mt_rand(1,1000)}" />
<link rel="stylesheet" href="__app__/admin/view/Member/uploadVcr/webuploader.css" />
<style>
    form .table-base td select {
        width: 100px;
    }
    #uploader #video-show video{
        width: 150px;
        height: 84px;
    }
    .btns #afresh {
        margin-right: 35px;
        border-radius: 3px;
    }
    #video #picker {
        float: left;
        margin-right: 35px;
        width: 82px;
        height: 34px;
        line-height: 14px;
        border-radius: 3px;
    }
    #video #ctlBtn {
        border-radius: 3px;
    }
</style>
<body>

{include file="common/page/header"}

<div class="content container-fluid {if $leftBarScale eq '1'} scale {/if}">
    <div class="row">
        <div class="col-md-2 left-section">
            <!-- 左导航菜单 -->
            {include file="common/page/menu"}
        </div>
        <div class="col-md-10 right-section">
            <!--内容区域-->
            <h3><i class="icon iconfont"></i>上传视频</h3>
            <div class="inner-section row">
                <div id="content">
                    <form action="#" method="post" id="myForm"  enctype="multipart/form-data">
                        <table class="table table-striped table-hover table-bordered table-base">
<!--                            <tr id="video-c">-->
<!--                                <td class="td1"><label><span class="must-tag">*</span>视频封面图</label></td>-->
<!--                                <td class="td2">-->
<!--                                    <input class="form-control" title="支持jpg、jpeg、gif、png格式，文件小于5M" type="file" accept="image/*" id="videocover" name="imgs">-->
<!--                                    <input type="hidden" id="imgFlagCover" name="imgFlagCover" value="0">-->
<!--&lt;!&ndash;                                    &nbsp;&nbsp;&nbsp;&nbsp;图片建议尺寸：640*350px&ndash;&gt;-->
<!--                                    {notempty name="$info.imgs"}-->
<!--                                    {if condition="$info.imgs"}-->
<!--                                    <img src="{$Think.const.ROOT_URL}/{$info.imgs}" style="height: 40px;" title="缩略图" >-->
<!--                                    {$info.filename} 已上传-->
<!--                                    <input type="hidden" name="imgs" id="prev-cover" value="{$info.imgs|default=''}">-->
<!--                                    {/if}-->
<!--                                    <span style="color: red;cursor: pointer" onclick="deleteImage()">删除照片</span>-->
<!--                                    {/notempty}-->
<!--                                </td>-->
<!--                                <td class="td3"></td>-->
<!--                            </tr>-->
                            <tr id="video">
                                <td class="td1"><label><span class="must-tag">*</span>上传视频</label></td>
                                <td class="td2">
                                    <div id="uploader" class="wu-example">
                                        <!--用来存放文件信息-->
                                        <div id="thelist" class="uploader-list"></div>
                                        {if condition="$info.video_url"}
                                        <div id="video-show">
                                            <video preload controls {if condition="$info.imgs"}poster="{$Think.const.ROOT_URL}/{$info.imgs}"{/if}>
                                            <source src="{$Think.const.ROOT_URL}/{$info.video_url}" type="video/mp4">
                                            </video>
                                        </div>
                                        {/if}
                                        <div class="btns">
                                            {if condition="$info.video_url"}
                                            <a id="afresh" class="btn btn-info">删除视频</a>
                                            <div id="picker" class="hidden">选择视频</div>
                                            {else/}
                                            <a id="afresh" class="btn btn-info hidden">删除视频</a>
                                            <div id="picker">选择视频</div>
                                            {/if}
                                            <div id="ctlBtn" class="btn btn-default">开始上传</div>
                                            <input type="hidden" id="video-url" name="video_url" value="{$info.video_url|default=''}">
                                            <input type="hidden" id="videoFlag" name="videoFlag" value="0">
                                        </div>
                                    </div>
                                </td>
                                <td class="td3 v-notice"></td>
                            </tr>
                            <tr>
                                <td></td>
                                <td>
                                    <input type="hidden" id="root-url" value="{$Think.const.ROOT_URL}">
                                    <input type="hidden" name="order_id" value="{$Think.get.order_id}">
                                    <input type="hidden" name="store_id" value="{$Think.get.store_id}">
                                    <input type="hidden" name="user_id" value="{$Think.get.user_id}">
                                    <input type="hidden" name="type" value="{$Think.get.type}">
                                    <a class="btn btn-success btn-md" id='save'>提交</a>
                                    <a class="btn btn-default btn-md" href="javascript:window.history.go(-1);">返回</a>
                                </td>
                            </tr>
                        </table>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{include file="common/page/jsfiles"}
<!-- 页脚 -->
{include file="common/page/footer"}

<script type="text/javascript" src="__static__/js/form/jquery.form.js"></script>
<script type="text/javascript" src="__static__/js/form/jquery.validate.js"></script>
<script type="text/javascript" src="__static__/js/form/jquery.validate.extend.js"></script>
<script type="text/javascript" src="__app__/admin/view/Member/uploadVcr/uploadVcr.js?z={:mt_rand(1,1000)}"></script>
<script type="text/javascript" src="__app__/admin/view/Member/uploadVcr/webuploader.js"></script>
<script type="text/javascript" src="__app__/admin/view/Member/uploadVcr/getting-started.js?z={:mt_rand(1,1000)}"></script>
<script>
    // 删除
    // function deleteImage() {
    //     var user_id = $('input[name="user_id"]').val();
    //     var type = $('input[name="type"]').val();
    //     myConfirmModal("确定删除吗？", function () {
    //         $.ajax({
    //             url: "deleteImage",
    //             type: "post",
    //             data: {"user_id": user_id,"type":type},
    //             dataType: "json",
    //             beforeSend: function (xhr) {
    //                 //显示“加载中。。。”
    //                 $("#loading").modal('show');
    //             },
    //             complete: function () {
    //                 //隐藏“加载中。。。”
    //                 $("#loading").modal('hide');
    //             },
    //             success: function (json, statusText) {
    //                // window.location.reload();
    //             },
    //             error: errorResponse
    //         });
    //     });
    // }
</script>
</body>
</html>